Welcome to the NextGen Testing Platform wiki! A Description of our pages are as follows:
| S.no | Requirement | Minimum | Recommended | Special Cases |
|---|---|---|---|---|
| 1 | Processor | Dual-Core | Intel i5 | Intel i7 or quad core for Data/ETL validations |
| 2 | RAM | 8GB | 16GB | 32GB or more for Data/ETL validations/ Mac book Pro 32GB preferable |
| 3 | Elevated access | Temporary | Extended for Testing IE websites | - |
There are 2 options for Java installation
Note: Use Open JDK, unless there is an explicit requirement to use Oracle JDK, as it comes with no-strings-attached and is completely open source.
Install OpenJDK14 or above LTS version from here JDK 14 or above will be the most compatible. Always use Long Term Support (LTS) versions (jdk 11, 14).
**How to set New Environment Variables:**
1. Click the file explorer icon on your computer
2. Right click on "This PC" and select the "Properties" option
3. Click on advanced system settings
4. On the Advanced tab, select Environment Variables, and then click new
5. Furnish the variable name and path. Click OKDownload and install Tortoise SVN from TortoiseSVN
Subversion Code Checkout
or,
Internally, we use GitHub within EY. So this must be your choice if you are installing NGTP within EY network.
Note: For the merge, fork, mirror, PR and general Github best practices refer the Github guidelines document.
Setup new variables – Click New
- JAVA_HOME:
- e.g C:\softwares\jdk-14.0.2 - MAVEN_HOME:
-e.g C:\maven\apache-maven-3.6.3 - M2_HOME:
-e.g %MAVEN_HOME% - M2_REPO:
-e.g C:\Users\ .m2\repository - LICENSE_PATH:
-e.g C:\Users\ \licenses\NGTP\license.bin
Add the following to your Path variable if not present already
- Maven Bin folder – e.g: %MAVEN_HOME%\bin
- Java Bin folder – e.g: %JAVA_HOME%\bin
Note: If you have any other versions of java in your path variables, either remove them or move them down below the above Java path we just set.
Test if everything works
where javajava -versionwhere mavenmaven -version
Note: All of them should give the versions of the most recently installed software. If not revisit the steps above and check if you missed any.In order for you to clone your projects, push and pull from GitHub every time without having to enter your user name password, you need to configure Secure Shell (SSH) on your machine and provide GitHub with that details. This will enable GitHub and your machine to communicate securely without you needing to authorize yourself. More details on this can be found here
The GitHub website has laid down the steps to generate an SSH key. Please follow the instructions diligently to set up SSH and add the key to your GitHub Settings. Do not forget to enable SSO after creating SSH. Once you have done this, you will be able to clone the projects using SSH links instead of the https URLs.
Now, navigate to File -> Settings -> Version Control and select GitHub. Click the + sign on the right side and select Login via GitHub option and follow the prompts to get SSO access to GitHub from IntelliJ. Below the window, check the checkbox that says:
The library is license restricted with a digitally-signed EY license. You will need a license file or, a license token added to your environment variables to activate the tool. Get a limited duration license from our NGTP License Administrators. Email them the following details to help create your license
If given a license file,it to a secure location in your file system and note down the path. Provide the path in your environment variables in the below format. Details are provided in the above.
| Key | Value |
|---|---|
| LICENSE_PATH | YOUR LICENSE FILE PATH |
Note: Alternative way if you cannot access environment variables, if you are running locally in IntelliJ, you can go to Edit configurations > Environment Variables (under configuration tab) and save the key value pair as LICENSE_PATH=
As mentioned earlier, Next Gen Testing Platform is a modular test harness: it needs the following to function:
and many more. Please refer the wiki links for other such component libraries.
To configure your project to consume these libraries you need to add either the library dependencies to your pom.xml and cofiguring your maven settings.xml or, their library jars directly to your project and adding it to your pom.xml. This is what will be covered in the next sections.
But once completed your pom.xml will essentially contain these
<dependency>
<groupId>com.ey</groupId>
<artifactId>etaf-step-definitions</artifactId>
<version>1.1.1</version>
<!--<systemPath>${project.basedir}/src/main/resources/JARs/etaf-step-definitions-1.1.1.jar</systemPath>-->
</dependency>
<dependency>
<groupId>com.ey</groupId>
<artifactId>etaf-core-library</artifactId>
<version>1.1.1</version>
<!--<systemPath>${project.basedir}/src/main/resources/JARs/etaf-core-library-1.1.1.jar</systemPath>-->
</dependency>
<dependency>
<groupId>com.ey</groupId>
<artifactId>license-validator</artifactId>
<version>1.0.7</version>
<!--<systemPath>${project.basedir}/src/main/resources/JARs/license-validator-1.0.7.jar</systemPath>-->
</dependency>
<dependency>
<groupId>com.ey</groupId>
<artifactId>etl-step-definitions</artifactId>
<version>1.0.2</version>
<!--<systemPath>${project.basedir}/src/main/resources/JARs/etl-step-definitions-1.0.2.jar</systemPath>-->
</dependency>
<dependency>
<groupId>com.ey</groupId>
<artifactId>etl-core-libraries</artifactId>
<version>1.0.3</version>
<!--<systemPath>${project.basedir}/src/main/resources/JARs/etl-core-libraries-1.0.3.jar</systemPath>-->
</dependency>Uncomment the src/main/resources/JARs/ folder of your project
Note: Don't panic if you do not see xxx-core-library dependencies. As long as you find xxx-step-definitions, its libraries will already be included. You are covered.
Within EY Testing I&A, we use GitHub as our tool of choice for version control and collaborative programming. If you are unfamiliar with Git and have not used GitHub before, you must review the GitHub user guides here: https://guides.github.com/
If you are tasked with working on any internal development, get access to our ey-advisory-technology-testing organization within GitHub. Refer the link for directions
Code button. File -> New -> Project from Version Controlcom.ey dependenciesTrouble-shooting hints:
File -> Project Structure. In the left pane, select Project Settings -> Project and select the installed JDK from the Project SDK drop down.Note: The same process of cloning the project can also be done using GitHub desktop. Read its documentation for that.
This will be a little different than what we do internally. Here we need to migrate approved components of NGTP to the client systems. We recommend a single person migrating the NGTP to client network, setting it up, committing and pushing to their version control software. Other team members who intend to use the NGTP can pull it from the VCS.
Code button. Download as zip button and download it to your folder. Let's call that folder to-client.My Transfers button on the top right of the ribbon.Follow the steps outlined in the installation prerequisites page
File -> New -> Project from Existing Sources and browse and select the pom.xml file inside the NGTP folder unzipped above.Open as a Project buttonNote: It is recommended that no matter how you choose to download your repository (GitHub Desktop, IntelliJ integration, or simply downloading from GitHub) that you connect your repository to GitHub Desktop to take advantage of the UI when merging. You can add any downloaded GitHub project stored on your computer to GitHub Desktop by clicking file/add a local repository and then pathing to that repository’s location on your computer
Important
The Next Gen Testing Platform UI is a desktop application which can be set up with user’s existing NGTP (also known as Next Gen Testing Platform) project to allow them to design, execute and report test cases from a UI interface instead of having to use a developer-centric IDEs like Eclipse, IntelliJ etc. This product is a cross platform desktop application that is easy to install and intuitive to work with.
NGTP UI has four tabs, each having the following functionality:
Dashboard tab is landing page for our application. First time users need to select their default framework directory before using any other tab or features available. Dashboard, as the name implies, is available to present the user with information and shows the reports available in the framework from previous test runs.
Test Design tab is place where users can create their own steps and scenarios under feature files. Users can also edit available features from the chosen framework workspace. The tab is split into three sections- Feature files (Left menu). Canvas area (middle) and Page objects (right menu)
Execute tab is the place where users can execute feature files that already exists in the project or created in the Design tab. Users can choose the scenarios from the feature files explorer section, with the help of search and filter functionality. There is a Run configuration drop down area where users can change basic and most used test configurations that are available in settings tab.
Settings tab is the space where users can configure the settings needed for the framework. It contains 8 sub-tabs or sections categorized based on functionality.
~src/main/java/seleniumutils/reusablestepdefinitions~src/test/java/{workspace}/stepdefinitionsThis will change in the next release where we can configure paths to custom step definitions
As this is the MVP release, the product has a few limitations and assumptions:
Automation tests in the UI are created using Feature Files. Features files contain a list of scenarios composed of Steps written in Gherkin language which provides a way to describe your application behavior in business readable language. Each feature can have one or more scenarios, and every scenario consists of one or more steps.
Every Scenario is an individual test case. Scenario is one of the core Gherkin structures. Every scenario starts with the keyword “Scenario:” (or localized one) and is followed by an optional scenario title. Every scenario consists of a list of steps, which must start with one of the keywords Given, When, Then, But or And.
A step definition is a common template for a step. E.g. Given I navigate to “__”. Here you can fill any valid URLs. A Step Definition links the java code to one or more Gherkin steps. When Cucumber executes a Gherkin step in a scenario, it will look for a matching step definition to execute.
You can use tags to group features and scenarios together, independent of your file and directory structure. This allows you to run multiple tests at once.
A. Go to Settings>Paths and make sure that the back-end framework’s path is selected. When you click browse, the selected folder should show “src” directory and “pom.xml”
A. Go to Settings>path and make sure the path for reports is empty if you want the default reports to load or select a specific report (index.html) for it to be loaded on dashboard
A. To clear the path, you will have to go to Settings and click on “Reset Settings” button. Please note, this will also reset all other settings
A. This happens if there was an error in executing the tests after build was run successfully. Make sure your back-end framework is set up correctly by running command:
mvn clean install to see if all default testsmvn clean install -Dsource.feature="<path of the folder where your feature files are located> " -Dapplication="<applicationName>" -Denvironment="<environment name>
If any one of the above commands fail, you may need to update the back-end framework’s POM.xmlNext Gen Testing Platform is a behavior driven development (BDD) based test automation framework to test Web, API, Desktop, ETL and many other applications. It enables you to write and execute automated acceptance/unit tests. Automate your test cases with minimal coding. More Details
The Next Gen Testing Platform is a comprehensive platform to accelerate testing and increase automation ROI through unique capabilities crafted by EY experience, innovation and technology. It is a modular 3-tier Test Automation Harness built using Java. Primarily, it leverages Cucumber and Java to achieve the automation objectives and uses Gherkin Language for writing test scripts that also serves a living documentation of acceptance criteria. The same harness can be used to test a variety of applications ranging from Web, Windows, API, Mobile to even Accessibility testing.
The NGTP consists of 3 layers
Application/Business layer - This is the layer where the tester interacts with NGTP. It contains the english-like Gherkin sentences(Given...,When..., Then...) that drive the tests. It also contains external test data and test configurattions
Once you followed all the steps to successfully install NGTP, you will be able to create new tests, run new tests and also create new testing projects.
Your NGTP should come with a sample/training project called amazonDemo (unless you are in client projects in which case the framework will be stripped of any external tests). You can run its scenarios as follows
Open src/test/java/methods/FunctionalCukesTest.java
Right click on the class name and select Run FunctionalCukesTest
Add the following folders according to the structure
src/test/resources/<your_project>/data src/test/resources/<your_project>/features
src/test/resources/<your_project>/data/inputdata
src/test/resources/<your_project>/data/environments.yaml
src/test/resources/<your_project>/data/<PageObjects.xlsx | PageObjects.yaml | PageObjects.json>
- 3 formats of data are supported: xlsx, yaml, json.
src/test/java/seleniumutils/applicationlayer/<your_project>/stepdefinitions/*StepDefinitions.java
src/test/java/seleniumutils/<your_project>/pageobjects/*Page.java
Open cucumber.properties file and change the setting application = [your project name]
Any feature file you add will go under the features folder or its sub folder within the one created above
The cucumber features goes in the features library and should have the ".feature" extension. The first line of that file should always be Feature: [Feature name]
You can start out by looking at amazonDemo/features/product_checkout.feature. You can automate most applications using any of the reusable steps that comes with Next Gen Testing Platform.
In Next Gen Testing Platform, page or screen locators are maintained in flat files externally. You can store all your locators in EXCEL, YAML or JSON format. The file name should always be PageObjects.xlsx/PageObjects.yaml/PageObjects.json
Page contains elements contains attributes
Interpreted in xlsx, this will be:
Example
| element_type | variable | value | id | class | name | xpath | css | linkText | partialLinkText | tagname |
|---|---|---|---|---|---|---|---|---|---|---|
| input | username | Text1 | ||||||||
| link | asus_zenbook | (//*[contains(text(),'ASUS ZenBook 13')])[1] |
In JSON, this will be:
{
"Amazon":
[
{
"element_type": "data",
"variable": "home",
"value": "http://www.amazon.com",
"id": "",
"class": "",
"name": "",
"xpath": "",
"css": "",
"linktext": "",
"partiallinktext": "",
"tagname": ""
},
{
"element_type": "textbox",
"variable": "search_bar",
"value": "",
"id": "twotabsearchtextbox",
"class": "",
"name": "",
"xpath": "",
"css": "",
"linktext": "",
"partiallinktext": "",
"tagname": ""
}
],
"SecurityPage":
[
{
"element_type": "",
"variable": "edit_name",
"value": "",
"id": "auth-cnep-edit-name-button",
"class": "",
"name": "",
"xpath": "",
"css": "",
"linktext": "",
"partiallinktext": "",
"tagname": ""
}
]
}In YAML,
"Amazon":
- element_type: data
variable: home
value: 'http://www.amazon.com'
id: ""
class: ""
name: ""
xpath: ""
css: ""
linktext: ""
partiallinktext: ""
tagname: ""
- element_type: textbox
variable: search_bar
value: ""
id: twotabsearchtextbox
class: ""
name: ""
xpath: ""
css: ""
linktext: ""
partiallinktext: ""
tagname: ""
"SecurityPage":
- element_type: ""
variable: edit_name
value: ""
id: auth-cnep-edit-name-button
class: ""
name: ""
xpath: ""
css: ""
linktext: ""
partiallinktext: ""
tagname: ""
- element_type: ""
variable: success_verification
value: ""
id: ""
class: ""
name: ""
xpath: '//*[@id="auth-success-message-box"]/div/h4'
css: ""
linktext: ""
partiallinktext: ""
tagname: "" As with Page Objects, Test data is also supported in the above 3 formats You can refer to any of the sample projects for the data formats. The path is shared above in the New project section.
All Test environment properties and run configurations can either be setup through cucumber.properties or added to your POM.xml under the properties tag
or even fed at runtime through command line options as -D
browser
By using reusable steps you can automate your test cases more quickly, more efficiently and without much coding. The reusable steps are located in the etl-step-definitions jar and etaf-step-definitions jar
With Next Gen Testing Platform you can fill either a single field or an entire page or even multiple pages with a single step using this step
I fill (.+) data from (.+) (?:yaml|sheet|json) onto the page
e.g Given I fill personal_details from checkoutpage yaml onto the pageNote: For the above example, make sure you do have a dataset called personal_details in your checkoutpage.yaml (or json or excel sheet) to test this example
Next Gen Testing Platform allows you to generate commonly used data like name, addresses Identification informations automatically. You only have to specify either what information you want or what pattern of data you want to be entered into a particular field and then Next Gen Testing Platform automatically generates that information for you. This helps every test run of yours to be unique.
Terminal
Go to your project directory from terminal and hit following commands
mvn test|install (default will run on local firefox browser)
mvn test|install "-D<propertyname>=value` e.g `mvn test "-Dbrowser=chrome" (to use any other browser)
e.g. mvn clean install -Dapplication=amazonDemo
It will automatically run all the tests under features directory provided the properties in pom.xml are configured appropriatelyAlternative: This command can be configured in a batch file and then simply double-clicking the file will run the scenarios for you. The batch file can also be run using windows scheduler on a regular schedule.
IDE
FunctionalCukesTest.java located under src/test/java/methodsClick Run button on the top right of your IDE (or from your right click context menu)
Using Cucable Plugin
Next Gen Testing Platform uses Cucable plugin to parallelize the execution process. All you have to do is open the pom.xml and update a few settings under the configurations tag of com.trivago.rta cucable plugin highlighted below
<plugins>
...
<plugin>
<groupId>com.trivago.rta</groupId>
<artifactId>cucable-plugin</artifactId>
<version>1.5.1</version>
<executions>
<execution>
<id>generate-test-resources</id>
<phase>generate-test-resources</phase>
<goals>
<goal>parallel</goal>
</goals>
</execution>
</executions>
<configuration>
<sourceRunnerTemplateFile>src/test/java/methods/CucableJavaTemplate.java</sourceRunnerTemplateFile>
<sourceFeatures>${project.basedir}/src/test/resources</sourceFeatures>
<includeScenarioTags>${tags}</includeScenarioTags>
</configuration>
</plugin>
...
</plugins>In the above section, verify if,
Using Native Cucumber
Refer the remove cucable plugin steps documentation for a step-by-step walk-through on this.
© 2020 Ernst & Young LLP. All Rights Reserved. Any unauthorized use or disclosure is strictly prohibited.
NGTP is built modularly and it can support a whole lit of java libraries. If its a java library, it works with NGTP. If the library is hosted in a Central repository like maven you can simply copy/paste its dependency in the pom.xml under <dependencies></dependencies>
NGTP supports Docker/Kubernetes based test containerization and distributed parallel execution. Here is how you will do it.
NGTP can be deployed to Azure Devops as easily as it can be pushed to a GitHub repository. Here is how you will do it.
Report portal is an AI powered Test Automation Dashboard. It can:
Here is how you will do it.
Note: GitHub enterprise licenses are scarce and will only be allotted with a strong business case.
README
Copy and paste the clone URL from the GitHub project's web page to your IntelliJ clone window
After hitting clone your project will be downloaded to your local file system
In GitHub, click on the watch drop down button on the top right corner of the project Select Custom -> Releases. This will notify you if there are any new releases in the project. Do this for all the GitHub projects that you need to keep track of. Especially the libraries that NGTP is directly depending on (etaf-helpers, etaf-core-library, etaf-step-definitions etc).
Important
In case you need to use NGTP at your client engagement, you will need to mirror the ngtp-official repository. The steps for that is outlined here. Refer to the first section on mirroring a repository and follow the steps.
Setup branch protection rules to ensure analysts cannot push directly to master and for every PR to have at least 1 required reviews before merge. Follow the below link to know how
Every repository must have a PR template. Feel free to take one from our NGTP Official.
All projects within our organization must follow the standards and guidelines outlined below.
pull before push methodology when collaborating in GitHub. It means everyone needs to take updates from the master branch before pushing their on changes. This will minimize merge conflicts and prevent broken code.Ensure you have taken an update before you begin working on pushing the code back to GitHub.
We strictly follow a feature branch push methodology for pushing our code. It means no one should be pushing code directly to the master branch. Master/Main branch is considered sacrosanct and un tested and unreviewed code shall not be pushed into it.
Below is a proper way of pushing code:
Analyst selects at least 1 reviewer for the PR and one of the peers/lead should review the code before merging it in.
Whoever merges the code in should delete the branch so that the repository is kept uncluttered.
During the course of the project, the team might create tools, libraries or methods that could be a value add for our NGTP. This is one of the key ways NGTP can grow as a platform, through peer and project contributions.
In case if there are such candidates to be incorporated into the trunk, cut a branch called release. In IntelliJ, switch to that release branch and create a PR to the Trunk. It will be reviewed by the NGTP admins and if approved will be merged into the Trunk.
For everyone who is using NGTP at the client location and whoever needs to subscribe to all the updates from NGTP, please follow the below steps to subscribe to the NGTP release. This step needs to be performed for all our EY libraries used by your project. The list of libraries can be obtained from your pom.xml. Look for any dependency that says com.ey. e.g
<dependency>
<groupId>com.ey</groupId>
<artifactId>etaf-step-definitions</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>com.ey</groupId>
<artifactId>etl-step-definitions</artifactId>
<version>1.0.4</version>
</dependency>Whenever there is an update or a release notification to any of these repositories, if you are within EY network, update the corresponding dependency version in your project's pom.xml to take the latest update. If you are within the client network, follow the steps outlined in Installing NGTP at client network to get your project updated.
We will be following the below versioning strategy for our projects.
Important
If download of repository is blocked due to any restrictions, please see the below work arounds in order of convenience:
Below please find the steps to fix the issue:
If you are unable to download dependencies directly through the pom, you can manually setup maven by copying the .m2 folder from the SharePoint and exporting it to specified location on your laptop or VDI. SharePoint link: https://sites.ey.com/:u:/s/TestingiCOP/TestAutomation/EbDwXaiL3zRCr1j_X3746U4BJ8UXbFmWcZ63R1nHk4IueQ Location to unzip to: C:\Users{your_username}
If you are unable to download maven at all, you can send over the following Apache.zip. SharePoint link: https://sites.ey.com/:u:/s/TestingiCOP/TestAutomation/EZo9K4R-KI1DqJn2kyDL_pQBB5IC5IUfqG7mPyUHfsmUxw Location to unzip to: C:\Program Files
If you are unable to download dependencies directly through the pom, you can manually download the dependencies listed at the below link from https://mvnrepository.com/.
List of dependencies: https://sites.ey.com/:w:/s/TestingiCOP/TestAutomation/EWSnYPRJ9RxLmDN_lnByUXkBZ0cOUsrbmdQXtsb7Ko8zGg Steps to manually add maven dependencies as jars:
If the dependencies are from EY like com.ey.xyz refer to the last page in this document about Using GitHub Hosted Dependencies
@argfile (Java 9+) - java @argfile classname [args]